#include"wuziqi.h"
int kk(int s[16][16],int i,int j){
	for(i=1;i<16;i++){
		for(j=1;j<16;j++){
			if(s[i][j]==s[i][j+1]&&s[i][j+1]==s[i][j+2]&&s[i][j+2]==s[i][j+3]&&s[i][j+3]==s[i][j+4]&&s[i][j+4]!=43) 
			return s[i][j]; }
	}
	
	
    for(i=1;i<16;i++){
		for(j=1;j<16;j++){
			if(s[i][j]==s[i+1][j]&&s[i+1][j]==s[i+2][j]&&s[i+2][j]==s[i+3][j]&&s[i+3][j]==s[i+4][j]&&s[i+4][j]!=43)
				return s[i][j];
			 }
	}
	
	
	for(i=1;i<16;i++){
		for(j=1;j<16;j++){
			if(s[i][j]==s[i+1][j+1]&&s[i+1][j+1]==s[i+2][j+2]&&s[i+2][j+2]==s[i+3][j+3]&&s[i+3][j+3]==s[i+4][j+4]&&s[i+4][j+4]!=43)
			return s[i][j]; }
	}
	
	
	for(i=1;i<16;i++){
		for(j=1;j<16;j++){
			if(s[i][j]==s[i+1][j-1]&&s[i+1][j-1]==s[i+2][j-2]&&s[i+2][j-2]==s[i+3][j-3]&&s[i+3][j-3]==s[i+4][j-4]&&s[i+4][j-4]!=43)
			return s[i][j]; }
	}
	return 0; 
	}


